# 1.编码 encode
a='你好啊'
b=a.encode(encoding='utf-8')
print(b)
# 2.解码
c=b.decode(encoding='utf-8')
print(c)
# 3.混合编码
e='你好'.encode(encoding='utf-8')+'你不好'.encode(encoding='gbk')
print(e)
# 4.混合码解码(鬼符)
print(e.decode('utf-8',errors='replace'))# 错误的码会提示
print(e.decode('utf-8',errors='ignore'))# 错误的码会忽略